﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using ZBJF.Warranty.Common.Enums.Base;
using ZBJF.Warranty.Model;
using ZBJF.Warranty.Model.ViewModel.ServiceProvider;

namespace ZBJF.Warranty.IBLL
{
    public partial interface IServiceProviderBranchService
    {
        /// <summary>
        /// 根据主键ID获取服务商网点
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        ServiceProviderBranch LoadByID(int id);
        /// <summary>
        /// 判断服务商网点是否存在
        /// </summary>
        /// <param name="accessoriestName">服务商网点名称</param>
        /// <param name="id">服务商网点ID</param>
        /// <returns></returns>
        bool IsExist(string accessoriestName, int id = 0);

        /// <summary>
        /// 分页获取服务商网点列表
        /// </summary>
        /// <param name="model">过滤条件</param>
        /// <param name="total">总数量</param>
        /// <returns></returns>
        IQueryable<ServiceProviderBranch> GetPagingList(ServiceProviderBranchModel model, out int total);


        /// <summary>
        /// 获取服务商网点列表
        /// </summary>
        /// <param name="ServiceProviderId">服务商ID</param>
        /// <param name="WarrantyMaintenanceTypeId">服务类型ID</param>
        /// <param name="serviceProductType">服务商类型</param>
        /// <returns></returns>
        List<ServiceProviderBranchSelectModel> GetServiceProviderBranch(int ServiceProviderId, byte WarrantyMaintenanceTypeId, ServiceProductType serviceProductType);
        /// <summary>
        /// 获取服务商网点列表
        /// </summary>
        /// <param name="ServiceProviderId">服务商ID</param>
        /// <param name="WarrantyMaintenanceTypeId">服务类型ID</param>
        /// <param name="serviceProductType">服务商类型</param>
        /// <returns></returns>
        List<ServiceProviderBranchSelectModel> GetServiceProviderBranch(int ServiceProviderId, byte WarrantyMaintenanceTypeId);
    }
}
